<include file="public@header" />
</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <div class="layui-card">
            <div class="layui-card-header">
                <h3>会议室预订管理</h3>
            </div>
            <div class="layui-card-body">
                <form class="form-search layui-form layui-form-item clearfix" action="{:url('AdminMeetingBook/index')}">
                    <div class="layui-col-md11 layui-col-sm10">
                        <div class="layui-inline">
                            <select class="layui-input" name="meet_id">
                                <option value="0">请选择会议室</option>
                                <foreach name="meet" item="vo">

                                <option value="{$vo['id']}" <if condition="input('meet_id') eq $vo['id']">selected</if> >{$vo['list_title']}</option>
                                </foreach>
                            </select>
                        </div>
                        <div class="layui-inline">
                            <select class="layui-input" name="is_pay">
                                <option value="0">是否缴费</option>
                                <option value="1" <if condition="input('is_pay') eq 1">selected</if> >是</option>
                                <option value="2" <if condition="input('is_pay') eq 2">selected</if> >否</option>
                            </select>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">{:lang('TIME')}:</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input js-layui-date" name="start_time"
                                       value="{$start_time|default=''}"
                                       style="width: 100px;" autocomplete="off">
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input js-layui-date" name="end_time"
                                       value="{$end_time|default=''}"
                                       style="width: 100px;" autocomplete="off">
                            </div>                    
                        </div>
                        <div class="layui-inline">
                            <input type="submit" class="layui-btn layui-btn-normal" value="{:lang('SEARCH')}"/>
                        </div>
                        <!-- <a class="layui-btn layui-btn-danger layui-btn-sm" href="{:url('AdminArticle/index')}">清空</a> -->


                       <!--  <if condition="cmf_auth_check(cmf_get_current_admin_id(), 'portal/adminarticle/export')">
                            <div class="layui-inline">
                                <a class="layui-btn layui-btn-danger" href="{:url('AdminArticle/export',array('start_time'=>$start_time,'end_time'=>$end_time,'keyword'=>$keyword,'category'=>$category))}" >导出点击量统计</a>
                            </div>
                        </if> -->
                        <div class="layui-inline">
                            <!-- <a class="layui-btn layui-btn-normal fr" href="javascript:checkAdd();">{:lang('PORTAL_ADMINARTICLE_ADD')}</a> -->
                            
                            <a class="layui-btn layui-btn-danger" href="{:url('AdminMeetingBook/export',array('start_time'=>input('start_time'),'end_time'=>input('end_time'),'is_pay'=>input('is_pay'),'meet_id'=>input('meet_id')))}" >导出</a>

                            <a class="layui-btn layui-btn-normal fr" href="{:url('AdminMeetingBook/add')}">预定会议室</a>
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-card-body">
                <table class="layui-table" >
                    <thead>
                        <tr>
                            <th width="50">ID</th>
                            <th>会议室</th>
                            <th>会议主题</th>
                            <th>会议人数</th>
                            <th>会议时间</th>
                            <th>预定部门</th>
                            <th>联系人</th>
                            <th>联系电话</th>
                            <th>备注</th>
                            <th>会议类型</th>
                            <th>是否需要纯净水</th>
                            <th>是否需要布置主席台</th>
                            <th>对内参考价格</th>
                            <th>对外参考价格</th>
                            <th>实际结算价格</th>
                            <th>预定状态</th>
                            <th>支付状态</th>
                            <th width="240">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <foreach name="data" item="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.list_title}</td>
                            <td>{$vo.theme}</td>
                            <td>{$vo.num}</td>
                            <td>{:date('Y-m-d H:00:00',$vo['start_time'])} 至 {:date('Y-m-d H:00:00',$vo['end_time'])}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.user_login}</td>
                            <td>{$vo.mobile}</td>
                            <td>{$vo.remark}</td>
                            <td align="center">
                                <if condition="$vo.type eq 1">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">彩排</span>
                                <elseif condition="$vo.type eq 2">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">会议</span>
                                <elseif condition="$vo.type eq 3">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">演出</span>
                                <elseif condition="$vo.type eq 4">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">布场</span>
                                <else/>
                                    <span class="layui-btn layui-btn-xs layui-btn-normal">未选择</span>
                                </if>
                            </td>
                            <td align="center">
                                <if condition="$vo.is_water eq 1">
                                    <a data-toggle="tooltip" title="{:lang('PASS_AUDIT')}"><i class="fa fa-check"></i></a>
                                <elseif condition="$vo.is_water eq 0">
                                    <a data-toggle="tooltip" title="{:lang('NOT_PASS_AUDIT')}"><i class="fa fa-close text-danger"></i></a>
                                <else/>
                                    <a style="font-size:16px;" data-toggle="tooltip" title="{:lang('WAIT_AUDIT')}"><i class="fa fa-spinner text-warning fa-spin"></i></a>
                                </if>
                            </td>
                            <td align="center">
                                <if condition="$vo.is_layout eq 1">
                                    <a data-toggle="tooltip" title="{:lang('PASS_AUDIT')}"><i class="fa fa-check"></i></a>
                                <elseif condition="$vo.is_layout eq 0">
                                    <a data-toggle="tooltip" title="{:lang('NOT_PASS_AUDIT')}"><i class="fa fa-close text-danger"></i></a>
                                <else/>
                                    <a style="font-size:16px;" data-toggle="tooltip" title="{:lang('WAIT_AUDIT')}"><i class="fa fa-spinner text-warning fa-spin"></i></a>
                                </if>
                            </td>
                            <td><php>echo (($vo['end_time']-$vo['start_time'])/3600)*$vo['in_price'];</php></td>
                            <td><php>echo (($vo['end_time']-$vo['start_time'])/3600)*$vo['out_price'];</php></td>
                            <td>{$vo.price}</td>
                            <td align="center">
                                <if condition="$vo.status eq 0">
                                    <span class="layui-btn layui-btn-xs layui-btn-normal">未审核</span>
                                <elseif condition="$vo.status eq 1">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">已通过</span>
                                <elseif condition="$vo.status eq 2">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">不通过</span>
                                </if>
                            </td>
                            <td align="center">
                                <if condition="$vo.end_type eq 0">
                                    <span class="layui-btn layui-btn-xs layui-btn-normal">未交会场费</span>
                                <elseif condition="$vo.end_type eq 1">
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">已交会场费</span>
                                </if>
                            </td>
                            <td>
                                <a href="{:url('AdminMeetingBook/edit',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs">{:lang('EDIT')}</a>
                                <if condition="$vo['end_type'] eq 0">
                                <a href="javascript:parent.openIframeLayer('{:url('AdminMeetingBook/end',array('id'=>$vo['id']))}','{$vo.theme}菜单管理',{});" class="layui-btn layui-btn-danger layui-btn-xs">结算</a>
                                <else/>
                                <a class="layui-btn layui-btn-normal layui-btn-xs">已结算</a>
                                </if>
                                
                                
                                <a href="javascript:parent.openIframeLayer('{:url('AdminMeetingBook/shenhe',array('id'=>$vo['id']))}','{$vo.theme}菜单管理',{});" class="layui-btn layui-btn-danger layui-btn-xs">审核</a>

                                <if condition="$vo.cancel eq 2">
                                    <a href="javascript:parent.openIframeLayer('{:url('AdminMeetingBook/cancel',array('id'=>$vo['id']))}','{$vo.theme}菜单管理',{});" class="layui-btn layui-btn-danger layui-btn-xs">审核取消预定</a>
                                <elseif condition="$vo.cancel eq 1"/>
                                    <a class="layui-btn layui-btn-normal layui-btn-xs">已取消预定</a>
                                </if>
                                <a href="{:url('AdminMeetingBook/delete',array('id'=>$vo['id']))}" class="js-ajax-delete layui-btn layui-btn-danger layui-btn-xs">{:lang('DELETE')}</a>
                            </td>
                        </tr>
                        </foreach>
                    </tbody>
                </table>
                <div class="pages">{$page|default=''}</div>
            </div>
        </div>        
    </div>

<include file="public@footer"/>
